---
title: TencentHunyuan
---

The `TencentHunyuanEmbeddings` class uses the Tencent Hunyuan API to generate embeddings for a given text.

## Setup

1. Sign up for a Tencent Cloud account [here](https://cloud.tencent.com/register).
2. Create SecretID & SecretKey [here](https://console.cloud.tencent.com/cam/capi).
3. Set SecretID and SecretKey as environment variables named `TENCENT_SECRET_ID` and `TENCENT_SECRET_KEY`, respectively.

import IntegrationInstallTooltip from '/snippets/javascript-integrations/integration-install-tooltip.mdx';

<IntegrationInstallTooltip/>

```bash npm
npm install @langchain/community @langchain/core
```
If you are using LangChain.js in a browser environment, you'll also need to install the following dependencies:

```bash npm
npm install crypto-js
```

And then make sure that you import from the `web` as shown below.

## Usage

Here's an example:

import TencentHunyuan from "/snippets/javascript-integrations/examples/models/embeddings/tencent_hunyuan.mdx";

<TencentHunyuan />

## Related

- Embedding model [conceptual guide](/oss/concepts/embedding_models)
- Embedding model [how-to guides](/oss/how-to/#embedding-models)
